
include ../Makefile.Res
Version:=5.10.0
ModuleName:=perl

Object:=perl.tgz
ObjectDir:=$(ModuleName)-$(Version)
ObjectSource:=$(ModuleName)-$(Version).tar.gz

DependFiles:=

ExtModuleNames:=

InstallDirTmp:=/tmp/perl5
InstallDir:=/usr/local/perl
CurrentDir=$(shell pwd )

Config:=-Dprefix=$(InstallDir) -des

.PHONY: all clean dist_clean

null:

all:$(Object) 

$(Object):$(ObjectSource) 
	rm -rf /tmp/perl5 && mkdir -p /tmp/perl5
	tar -xzf $(ObjectSource)
	cd $(ObjectDir);./Configure $(Config)
	$(MAKE) -C $(ObjectDir)
	$(MAKE) -C $(ObjectDir) #$(MAKE) -C $(ObjectDir) minitest
	$(MAKE) -C $(ObjectDir) install DESTDIR=$(InstallDirTmp)/
	rm -rf /tmp/perl5/usr/local/perl/man
	rm -rf /tmp/perl5/usr/local/perl/lib/5.10.0/i686-linux/auto/Encode/JP
	rm -rf /tmp/perl5/usr/local/perl/lib/5.10.0/i686-linux/auto/Encode/TW
	rm -rf /tmp/perl5/usr/local/perl/lib/5.10.0/i686-linux/auto/Encode/KR
	rm -rf /tmp/perl5/usr/local/perl/lib/5.10.0/pod
	cd /tmp/perl5; tar -czf $(Object) usr; cp -rf $(Object) $(CurrentDir)/

clean:
	rm -rf  $(InstallDirTmp) usr

dist_clean:clean
	rm -rf $(ObjectDir) $(ObjectSource) *.tar.gz $(Object)
	
